import cachetools.func

# @cachetools.func.ttl_cache(maxsize=128, ttl=10 * 60)
# def example_function(key):
#     return get_expensively_computed_value(key)

@cachetools.func.ttl_cache(maxsize=5, ttl=10 * 60)
def get_expensively_computed_value(key):
    if key ==0 or key == 1:
        return key
    else :
        return (get_expensively_computed_value(key-1) +  get_expensively_computed_value(key-2))


if __name__ == '__main__':
    print(get_expensively_computed_value(98))